<?php

class DataBase {

	static $banco;

	private function __construct() { }

	private static function conecta() {

		require_once('classes/database/config.inc.php');

		$conexao = new mysqli( $host, $user, $pass, $data );
		if ( $conexao->connect_error )
			echo $conexao->connect_error;

		return $conexao;

	}

	static function getBanco() {

		$class = __CLASS__;

		if ( !self::$banco )
			self::$banco = $class::conecta();
		return self::$banco;
	}

}

DataBase::getBanco();

?>